<?php


namespace app\api\behavior;


use think\Response;



header('Access-Control-Allow-Origin: http://localhost:88');
header('Access-Control-Allow-Methods:GET, POST');
header("Access-Control-Allow-Headers:appauthorization,Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-Requested-With");
header('Access-Control-Allow-Credentials:true');

class CORS
{
    public function appInit(&$params)
    {
        if(request()->isOptions()){
            exit();
        }
    }
}